cmake_minimum_required(VERSION 3.10)

project(Sysx)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)

add_subdirectory(sysx)
add_subdirectory(test)

target_include_directories(sysx PUBLIC ./)

file(GLOB_RECURSE HEADER_FILES "sysx/*.h")

if(WIN32)
set(DEP_PATH ../dependency)
endif()

if(UNIX)
set(DEP_PATH /usr/local)
endif()

set(CMAKE_INSTALL_INCLUDEDIR ${DEP_PATH})
set(CMAKE_INSTALL_LIBDIR ${DEP_PATH}/lib)

install(TARGETS sysx
        ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)


install(FILES ${HEADER_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/include/sysx)
